import { Input } from "element-ui";
import http from "../index";

// 新增
export const addRole = (data) =>
  http({
    url: "/api/role",
    method: "post",
    data,
  });

// 删除
export const deleteRole = (params) =>
  http({
    url: "/api/role/?" + params,
    method: "delete",
  });

//批量删除
export const deleteBatchRole = (data) =>
  http({
    url: "/api/role/deleteBatch",
    method: "delete",
    data,
  });

// 编辑
export const updateRole = (data) =>
  http({
    url: "/api/role",
    method: "put",
    data,
  });

// 查询
export const getRole = (data) =>
  http({
    url: "/api/role/getRole",
    method: "post",
    data,
  });

// 授权
export const authorization = (data) =>
  http({
    url: "/api/permissions",
    method: "post",
    data,
  });
  // 查询授权
  export const goPower = (params) =>
  http({
    url: "/api/permissions?"+params,
    method: "get"
  });
